package com.xin.di.uav.common.enums;

import lombok.Getter;

/**
 * @author ta136817
 */

@Getter
public enum CouponTypeEnum {
    /**
     * 优惠券类型枚举
     */
    NOT_STARTED("满减券", (byte) 0),
    UNDER_WAY("满折券", (byte) 1);
    private String desc;
    private Byte value;

    public void setValue(Byte value) {
        this.value = value;
    }

    CouponTypeEnum(String desc, Byte value) {
        this.desc = desc;
        this.value = value;
    }


    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static String getDesc(Byte value) {
        for (CouponTypeEnum ele : values()) {
            if (ele.getValue().equals(value)) {
                return ele.getDesc();
            }
        }
        return null;
    }

}
